Skip to content

Update BlissMotor - #1651

Merged
marcus-oscarsson merged 2 commits into
developfrom
pr/bliss-motor
Sep 10, 2026
Merged

Update BlissMotor#1651
marcus-oscarsson merged 2 commits into
developfrom
pr/bliss-motor

Conversation

@Phantominumm

Copy link
Copy Markdown
Contributor
  • Explicitly register the actuator via bliss_proxy.hardware.register() before fetching it
  • Remove the 'tape' velocity/jog special-case in get/set value, always use position/move()
  • Store the move() callback and add wait_ready() to block until BLISS confirms completion

Comment on lines +192 to +199
try:
pos = self.motor_obj.position
except Exception:
return self._nominal_value if self._nominal_value is not None else None
if pos is None:
# motor_obj.position can be None during init or if REST call returns null
return self._nominal_value if self._nominal_value is not None else 0.0
return pos

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this logic. To be tested

Comment on lines +206 to +211

_yaml_low = self.get_property("low_limit")
_yaml_high = self.get_property("high_limit")
if _yaml_low is not None and _yaml_high is not None:
self._nominal_limits = (float(_yaml_low), float(_yaml_high))
else:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this here? Why not in the init?

"Motor object not found for actuator '%s'" % (self.actuator_name,)
)

self.update_state(HardwareObjectState.BUSY)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite sure why we need this.

Comment on lines +263 to +269
def wait_ready(self, timeout: float | None = None):
if self._motor_callback is None:
return
with Timeout(timeout, RuntimeError("Timeout waiting for motor to be ready")):
self._motor_callback.get(monitor_interval=0.2)
self.update_state()
self.update_value()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was only a temporary fix, because the _on_property_changed and _on_online _changed were not executed. Check if still the case and eventually remove it.

@beteva beteva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve for now, but needs some more testing

@marcus-oscarsson
marcus-oscarsson merged commit 2d185f5 into develop Sep 10, 2026
12 checks passed
@marcus-oscarsson
marcus-oscarsson deleted the pr/bliss-motor branch September 10, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants